from django.shortcuts import render
from pay_cost.serializers import PayCostSerializers
from pay_cost.models import PayCostModel
from rest_framework import generics
from rest_framework.views import APIView
from django.core import serializers
# class PayCostViews(generics.ListCreateAPIView):
#     queryset = PayCostModel.objects.all()
#     serializer_class = PayCostSerializers

class PayCostView(APIView):
    def post(self,request):
        id_number = request.POST.get('id_number')
        uers = serializers.serialize(('json',PayCostModel.objects.filter()))